import 'package:flutter/material.dart';

enum GMMyButtonDirection {
  left,
  top,
}

class GMMyButton extends StatelessWidget {
  final String text;
  final Image image;
  final double? space;
  final TextStyle? textStyle;
  final GMMyButtonDirection direction;
  final GestureTapCallback? onTap;

  const GMMyButton({
    super.key,
    required this.text,
    this.textStyle,
    required this.image,
    this.space = 5.0,
    required this.direction, this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: direction == GMMyButtonDirection.left
          ? Row(
              children: [
                image,
                SizedBox(
                  width: space,
                ),
                Text(
                  text,
                  style: textStyle,
                )
              ],
            )
          : Column(
              children: [
                image,
                SizedBox(
                  height: space,
                ),
                Text(
                  text,
                  style: textStyle,
                )
              ],
            ),
    );
  }
}
